package converter;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.junit.Test;

public class RevertConverterImplTest {

    @Test
    public void testConvert() {
        List<Bird> birds = null;
        List<Flyable> flyables = new ArrayList<Flyable>();

        for (int i = 1; i <= 3; i++) {
            flyables.add(new Bird());
        }

        flyables.add(new Airplane());
        
        Flyable[]  fly = new Flyable[] { };
        
        List<Flyable> birdNew = Arrays.asList(fly);

        RevertConverter<Flyable, Bird> converter = 
            new RevertConverterImpl<Flyable, Bird>(Bird.class);

        birds = converter.convert(flyables);

        assertNotNull(birds);

        assertEquals(3, birds.size());

    }

}
